package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.Classes;
import com.gxuwz.zhangjiahui.entity.Student;
import com.gxuwz.zhangjiahui.mapper.ClassMapper;
import com.gxuwz.zhangjiahui.mapper.StudentMapper;
import com.gxuwz.zhangjiahui.service.IClassService;
import com.gxuwz.zhangjiahui.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class ClassServiceImpl extends ServiceImpl<ClassMapper, Classes> implements IClassService {

    @Autowired
    private ClassMapper classMapper;

    @Override
    public Classes findClassById(Classes classes) {
        return classMapper.findClassById(classes);
    }

    @Override
    public List<Classes> findClassAll() {
        return classMapper.findClassAll();
    }

    @Override
    public IPage<Classes> selectClassPage(Page<Classes> page, Wrapper<Classes> wrapper) {
        return classMapper.selectClassPage(page, wrapper);
    }

    @Override
    public void addClass(Classes classes) {
        classMapper.addClass(classes);
    }

    @Override
    public void updateClassById(Classes classes) {
        classMapper.updateClassById(classes);
    }

    @Override
    public void deleteClassById(Classes classes) {
        classMapper.deleteClassById(classes);
    }
}
